﻿@model GameSchool.Models.AssignmentViewModel

@{
    ViewBag.Title = Model.createAss.title;
    ViewBag.LevelID = Model.createAss.levelID;
    ViewBag.assignmentXP = Model.createAss.assignmentXP;
    ViewBag.timeLimit = Model.createAss.timeLimit;
    ViewBag.file = Model.createAss.file;
    Layout = "~/Views/Shared/_LayoutTeacher.cshtml";
}

<div class="mainSectionStuff">
    <h2>Create Assignment</h2>
    <div class="createForm">
        @using (Html.BeginForm()) {
            @Html.ValidationSummary(true)
                @Html.HiddenFor(model => model.levelID)
                @Html.HiddenFor(model =>model.courseID)
                @Html.HiddenFor(model => model.assignmentID)
                @Html.HiddenFor(model => model.assignmentXP)
                <div>
                <div class="tableSubtitle">Title of assignment:</div>
                @Html.TextBoxFor(x => x.assignmentTitle, new {@Value = ViewBag.Title })
                </div>
                <div>
                <div class="tableSubtitle">Description:</div>
                @Html.TextAreaFor(x => x.assignmentDescription, new {rows = "3", cols ="50"})
                </div>
                <div>
                <div class="tableSubtitle">Set time limit (by days):</div>
                @Html.TextBoxFor(x => x.assignmentTimeLimit, new {@Value = ViewBag.timeLimit })
                </div>
                <p>
                    <input type="submit" value="Save" />
                </p>
        }
    </div>
</div>

@section menu{

    <li>@Html.ActionLink("Courses Overview", "TeacherHome", "Teacher")</li> 
    <li>@Html.ActionLink("Edit Course", "CourseEdit", "Course", new { CID = Model.courseID }, null)</li>    
    <li>@Html.ActionLink("Edit Levels", "LevelEdit", "Level", new { CID = Model.courseID }, null)</li>
    <li>@Html.ActionLink("XP Asignment", "XPAsignment", "Home", new { CID = Model.courseID }, null)</li>
    <li>@Html.ActionLink("Achievements", "AssignAchievement", "Achievement", new { CID = Model.courseID }, null)</li>
}